package com.thd.springboottest.springbootextends.custombeanpostprocessor;

import org.springframework.stereotype.Component;

/**
 * com.thd.springboottest.springbootextends.custombeanpostprocessor.ExampleBeanB
 *
 * @author: wanglei62
 * @DATE: 2022/4/22 15:28
 **/
@Component
public class ExampleBeanB {
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ExampleBeanB(){
        System.out.println(" 执行 ExampleBeanB的构造方法 ...");
    }

    public void init(){
        System.out.println(" 执行 ExampleBeanB.init() ...");
    }

    public void destory(){
        System.out.println(" 执行 ExampleBeanB.destory() ...");
    }

    @Override
    public String toString() {
        return "ExampleBeanB{" +
                "name='" + name + '\'' +
                '}';
    }
}
